package com.lebang.medicalInquiry.mapper;

import com.lebang.medicalInquiry.model.po.User;
import com.lebang.medicalInquiry.model.vo.OrganizationOperationListVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    void updateByUuidKeySelective(User newUser);

    List<User> listByCondition(@Param("keyWord") String keyWord, @Param("state") Integer state, @Param("sex") String sex, @Param("page") int page, @Param("limit") Integer limit);

    User getByPhone(@Param("phoneNumber") String phone);

    User getByUuid(@Param("uuid") String uuid);

    Integer countByCondition(@Param("keyWord") String keyWord, @Param("state") Integer state, @Param("sex") String sex);

    List<OrganizationOperationListVo> organizationByCondition(@Param("organizationId") Integer organizationId, @Param("keyWord") String keyWord, @Param("state") Integer state, @Param("page") Integer page, @Param("limit") Integer limit);

    Integer organizationCountByCondition(@Param("organizationId") Integer organizationId, @Param("keyWord") String keyWord, @Param("state") Integer state);

    List<User> getUserHeadImgByUuids(@Param("uuids") List<String> uuids);

}